//
//  Date+Day.swift
//  AirlineReservation
//
//  Created by Kevin on 2020/3/10.
//  Copyright © 2020 Kevin. All rights reserved.
//

import UIKit

extension Date {
    
    func dayBetweenDate(toDate: Date) -> Int {
        let components = Calendar.current.dateComponents([.day], from: self, to: toDate)
        return components.day ?? 0
    }
    
}
